package ltd.newbee.mall.service.impl;

import ltd.newbee.mall.dao.SchoolMallPointsMapper;
import ltd.newbee.mall.service.SchoolMallPointsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SchoolMallPointsServiceImpl implements SchoolMallPointsService {
    @Autowired
    SchoolMallPointsMapper schoolMallPointsMapper;
    /**
     * 查询积分
     */
    @Override
    public Integer findPoints(Integer id){
        return schoolMallPointsMapper.findPoints(id).getPoints();
    }

    @Override
    public Boolean setPoint(Integer id, Integer points) {
        return schoolMallPointsMapper.setPoint(id,points)>0;
    }
}
